#include <iostream>
using namespace std;

class Complex {
	public:
		Complex(double r = 0.0, double i = 0.0) {
			real = r;
			imaginary = i;
		}
		double real;
		double imaginary;
};

Complex operator+(const Complex &a, const Complex &b) {
	return Complex(a.real + b.real, a.imaginary + b.imaginary);
}

Complex operator-(const Complex &a, const Complex &b) {
	return Complex(a.real - b.real, a.imaginary - b.imaginary);
}

int main() {
	Complex a(1, 2), b(2, 3), c, d;
	c = a + b;
	d = a - b;
	cout << c.real << "," << c.imaginary << endl;
	cout << d.real << "," << d.imaginary << endl;
	return 0;
}
